BACK TO BLOG OVERVIEW

[New templates feature] Control article body <img> schema.

From now templators can edit images (places inside article body) html structure. Default template for displaying images in editor body is called editor_image.tpl and is located in newscoop/themes/system_templates/editor_image.tpl.

To simply overwrite this template you have to create same file in your theme main dir so you can adjust it to your template however you want.

In this template you can get variables:

  • imgZoomLink - image full size image link, if "Zoom enabled for images in article content?" in system preferences -> Editor Settings is set to yes, you will get image full size link
  • imageDetails - details of image, its array of image parameters
    • width - image width
    • height - image height
    • sub - image caption
    • alt - image alt
    • align - image position
  • uri - MetaURL class

There is also available image object from $gimme e.g: $gimme->image->photographer

Custom editor_image.tpl content:

BACK TO TOP